package com.zb.vo;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.zb.entity.AccounLoginInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @Author WEN
 * @Date 2023/10/14 0014
 **/
@Data
@Accessors(chain = true)
@ApiModel("工单日志对象")
public class WorkLogVo {

    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "商家ID")
    private Long custAccId;

    @ApiModelProperty(value = "工单ID")
    private Long workId;

    @ApiModelProperty(value = "日志标题")
    private String name;

    @ApiModelProperty(value = "操作事件")
    private String event;

    @ApiModelProperty(value = "操作内容")
    private String content;

    @ApiModelProperty(value = "日志附件")
    private List<String> annexs;

    @ApiModelProperty(value = "操作人名称")
    private String createEmp;

    public WorkLogVo(){}

    public WorkLogVo(AccounLoginInfo logintInfo, Long workId, String event, String content, List<String> annexs) {
        this.id = IdWorker.getId();
        this.custAccId = logintInfo.getCustAccId();
        this.createEmp = logintInfo.getName();
        this.workId = workId;
        this.name = "";
        this.event = event;
        this.content = content;
        this.annexs = annexs;
    }

    public WorkLogVo(AccounLoginInfo logintInfo, Long workId, String event, String content) {
        this.id = IdWorker.getId();
        this.custAccId = logintInfo.getCustAccId();
        this.createEmp = logintInfo.getName();
        this.workId = workId;
        this.name = "";
        this.event = event;
        this.content = content;
    }

    public WorkLogVo(Long custAccId, String createEmp, Long workId, String event, String content) {
        this.id = IdWorker.getId();
        this.custAccId = custAccId;
        this.createEmp = createEmp;
        this.workId = workId;
        this.name = "";
        this.event = event;
        this.content = content;
    }

    public WorkLogVo(AccounLoginInfo logintInfo, Long workId, String event) {
        this.id = IdWorker.getId();
        this.custAccId = logintInfo.getCustAccId();
        this.createEmp = logintInfo.getName();
        this.workId = workId;
        this.name = "";
        this.event = event;
    }

    public WorkLogVo(Long custAccId, String createEmp, Long workId, String event) {
        this.id = IdWorker.getId();
        this.custAccId = custAccId;
        this.createEmp = createEmp;
        this.workId = workId;
        this.name = "";
        this.event = event;
    }
}
